I have this issue when:
I search for a contact in the top search bar (crt-E, I like hotkeys), use the keyboard to select a contact > enter.
Then, if I'm full screen/large window (with 'Chat' bar visible/maximized), it's fine and my keyboard cursor is in the 'Type a message' field.
If however, I'm using a smaller window, e.g. snapped to the right half of the screen, MS Teams pops open the 'Chat' bar on the left-hand side (that was invisible/minimized due to smaller window) and consequently, the focus for my keyboard cursor is not in the 'Type a message' field, but in the 'Chat' overview window.
Then, when I blindly type away, frustration starts, because instead of resulting in a text message my keyboard inputs are causing a variety of actions in the 'Chat' overview window.
Please, developers of Teams, fix this annoying behaviour!